//+---------------------------------------------------------------------------
//
// Copyright (C) Microsoft Corporation, 2008
//
// File: Tracing.cs
//
// Contents: TraceSource singleton
//
// Created by: Andrew Lin (yunlin@microsoft.com) July 2nd, 2008
//
//----------------------------------------------------------------------------

using System;
using System.Diagnostics;

namespace Microsoft.Reputation.Services
{
    internal static class DiagnosticTracing
    {
        private static TraceSource m_source = new TraceSource(
            "Microsoft.Reputation.Services.DataPointsLogger.Tracing", 
            SourceLevels.All);
        private static TraceSource m_debuggerAttachedSource = new TraceSource(
            "Microsoft.Reputation.Services.DataPointsLogger.Tracing",
            SourceLevels.Critical | SourceLevels.Error | SourceLevels.Warning);

        public static TraceSource Source
        {
            get
            {
                return Debugger.IsAttached ? DiagnosticTracing.m_debuggerAttachedSource : DiagnosticTracing.m_source;
            }
        }
    }
}
